#include "config_main.h"
#ifdef DDENN_TIMERS
/*
 * timers.h
 *
 *  Created on: 06.06.2009
 *      Author: Admin
 */

#ifndef TIMERS_H_
#define TIMERS_H_

#include "config_timers.h"


#include <XPLMDataAccess.h>
#include "xplane_tools.h"
#include "tools.h"

/**************************************************************************************/
//
//          it provides ddenn/timers/
//
/*************************************************************************************/
namespace DdennTimers{
struct ddenn_timer{
	float starttime;
	float pausetime;
	float pausedtime;
	int ispaused;
};


extern ddenn_timer DDennTimers[DDENN_TIMERS_COUNT];



void RegisterDdennTimers();
void UnregisterDdennTimers();



void dden_timer_create (ddenn_timer *  t);
void dden_timer_reset (ddenn_timer *  t);
void ddenn_timer_pause (ddenn_timer *  t);
void ddenn_timer_play (ddenn_timer *  t);
float ddenn_timer_gettime (ddenn_timer  t);




int GetTimerHours ( void *               inRefcon);
int GetTimerMinutes ( void *               inRefcon);
int GetTimerSeconds ( void *               inRefcon);
float GetTimerRaw ( void *               inRefcon);
void SetTimerRaw ( void *               inRefcon, float inValue);
void SetTimerClear(void *               inRefcon,
                 int                  inValue);
int GetTimerClear ( void *               inRefcon);

int GetTimerPause ( void *               inRefcon);
void SetTimerPause(void *               inRefcon,
                 int                  inValue);


}
/**************************************************************************************/
//
//          end of ddenn/timers/
//
/*************************************************************************************/


#endif /* TIMERS_H_ */
#endif
